#!/bin/sh /etc/rc.common

START=99
USE_PROCD=1

start_service()
{
	procd_open_instance
	procd_set_param env ZIGBEE2MQTT_DATA=/etc/zigbee2mqtt/ NODE_PATH=/opt/zigbee2mqtt/node_modules/winston/node_modules:/opt/zigbee2mqtt/node_modules/zigbee-herdsman/node_modules
	procd_set_param command /usr/bin/npm start --prefix /opt/zigbee2mqtt
	procd_set_param stdout 1
	procd_set_param stderr 1
	procd_close_instance
}
